
local MainScene = class("MainScene", cc.load("mvc").ViewBase)

function MainScene:onCreate()
    math.newrandomseed()
    display.loadSpriteFrames("stars.plist","stars.pvr.ccz")

    local num = 100
    local batch = cc.SpriteBatchNode:create("stars.pvr.ccz", num)
    batch:addTo(self)
    
    for i = 1, num do
        local sprite = display.newSprite("#star01.png")
        batch:addChild(sprite)
        sprite:setPosition(math.random(display.width),math.random(display.height))
    end
end

return MainScene
